
ac.skill('英雄26'){
    count = 0,
    on_add = function(self)
        local hero = self.owner
        local last = hero:get_point()
        local time = 0
        self.timer1 = ac.loop(100,function()
            local new = hero:get_point()
            if new * last==0 then
                time = time + 0.1
                if time>=1 then
                    time = time - 1
                    if self.count<10 then
                        self.count = self.count + 1
                        self:gc(hero:add('基础护甲',self.data1))
                        if self.count==10 then
                            self:gc(hero:add('护甲加成',self.data2))
                        end
                    end
                end
            else
                self.count = 0
                self:gc_clear()
            end
            last = new
        end)
    end,
    on_remove = function(self)
        if self.timer1 then
            self.timer1:remove()
        end
    end
}

